#ifndef VDIALOGSKIN_H
#define VDIALOGSKIN_H

#include <QDialog>
#include <QFile>
#include <QButtonGroup>
#include <QDebug>

#ifdef Q_OS_WIN
#include <windows.h>
#endif

namespace Ui {
class VDialogSkin;
}

class VDialogSkin : public QDialog
{
    Q_OBJECT

public:
    explicit VDialogSkin(QWidget *parent = nullptr);
    ~VDialogSkin();

protected:
    bool nativeEvent(const QByteArray &eventType, void *message, long *result)
    {
#ifdef Q_OS_WIN
        MSG *msg = static_cast< MSG * >( message );
        if(msg->message == WM_NCACTIVATE)
        {
            bool active = (bool)(msg->wParam);
            qDebug()<<"**************"<<eventType<<active;
            if(active){ //Dialog被激活
                //显示阴影或边框
            }else{

            }
        }
#endif
        return false;
    }
private slots:
    void on_pushButton_ok_clicked();

    void on_pushButton_cancel_clicked();

private:
    Ui::VDialogSkin *ui;
    QFile *m_pFile = nullptr;
    QString m_strStyleSheet;
    QButtonGroup *m_pBtnGp = nullptr;
    int m_nCheckedId;
};

#endif // VDIALOGSKIN_H
